//
//  Stroke.m
//  TouchPainter
//
//  Created by wjj on 15/2/12.
//  Copyright (c) 2015年 wjj. All rights reserved.
//

#import "Stroke.h"

@implementation Stroke

- (void)drawWithContext:(CGContextRef)context
{
    CGContextMoveToPoint(context, self.location.x, self.location.y);
    
    for (id <Mark> mark in _children)
    {
        [mark drawWithContext:context];
    }
    
    CGContextSetLineWidth(context, self.size);
    CGContextSetLineCap(context, kCGLineCapRound);
    CGContextSetStrokeColorWithColor(context, self.color.CGColor);
    CGContextStrokePath(context);
}

@end
